package com.mf.cloud.apis;

import com.mf.cloud.entites.PayDTO;
import com.mf.cloud.resp.ResultData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: PayFeignApi
 * Package: com.mf.cloud.apis
 *
 * @Author: lmf
 * @Create: 2024/3/13 22:45
 * @Version: 1.0
 * Description:
 */
@FeignClient("cloud-payment-service")
public interface PayFeignApi {
    @PostMapping("/pay/add")
    public ResultData<Integer> addPay(@RequestBody PayDTO payDTO);

    @GetMapping("/pay/select/{id}")
    public ResultData<PayDTO> getPay(@PathVariable("id") Integer id);
    @GetMapping("/pay/get/info")
    public String mylb();

    /**
     * 服务熔断、服务降级测试接口
     * @param id the id of the
     */
    @GetMapping("/pay/circuit/{id}")
    public String myCircuit(@PathVariable("id") Integer id);

    /**
     *  测试服务隔离
     * @param id the id of the
     */
    @GetMapping("/pay/bulkhead/{id}")
    public String myBulkhead(@PathVariable("id") Integer id);

    @GetMapping("/pay/management/get/{id}")
    public PayDTO getManagementPayById(@PathVariable("id") Integer id);
}
